/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.avu.tp.assign2.question3.ocp.vialoted;

/**
 *
 * @author Malotana
 */
public class DrawPicture {
    public void draw(Shape s){
        if(s.type == 1){
            rectangle(s);
        }
        else if(s.type == 2){
            triangle(s);
        }
    }
    public void triangle(Shape s) {
        System.out.println("Triangle " + s);
    }
    public void rectangle(Shape s) {
        System.out.println("Rectangle " + s);
    }
}